class Rect {
  num height;
  num width;
  Rect()
      : height = 2,
        width = 10 {
    print("${this.height}---${this.width}");
  }
  // area() {
  //   return this.height * this.width;
  // }
  get area {
    return this.height * this.width;
  }

  set areaHeight(value) {
    this.height = value;
  }
}

main() {
  Rect r = new Rect();
  print("面积：${r.area}");
}
